<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert tiaaaaaaaaaa here</title>
<jquery/>
<link type="text/css" rel="stylesheet" href="__ROOT__/admin/tpl/public/style/{$hd.session.style}.css"/>
<css file="__ROOT__/admin/tpl/public/css/common.css"/>
<css file="__ROOT__/admin/tpl/public/css/article.css"/>

<script>
	$(function(){
			$("#showNode").change(function(){   
     		var level  =$("#showNode").find('option:selected').attr('level');
			if(level == 0){
				$("#showNodeName").html('顶级');
				$("[name=level]").val('1');
				$("#showNodeLevel").html('应用');
			}
			if(level == 1){
				$("#showNodeName").html('应用');
				$("[name=level]").val('2');
				$("#showNodeLevel").html('控制器');
			}
			if(level == 2){
				$("#showNodeName").html('控制器');
				$("[name=level]").val('3');
				$("#showNodeLevel").html('方法');
			}     
    	})
	})

	
</script>
</head>
<body>
	<div class="comShow">
		<h1><a href="javascript:void(0)">添加权限节点</a></h1>
		<form action="__CONTROL__/add" method="post">
			<input type="hidden" name="rbacType" value="node"/>
			<div class='formStyle1'>
				<dl>
					<dt><strong>节点名称：</strong></dt>
					<dd><input type="text" name="name"></dd>
				</dl>
				<dl>
					<dt><strong>节点描述：</strong></dt>
					<dd><input type="text" name="title"></dd>
				</dl>
				<dl>
					<dt><strong>节点是否开启：</strong></dt>
					<dd>
						<input style='width:15px;' type="radio" checked   name="state" value="1">是
						<input style='width:15px;' type="radio"  name="state" value="0">否
		
					</dd>
				</dl>
				<dl>
					<dt><strong>所属关系：</strong></dt>
					<dd>
					<select id="showNode" name="pid">
						<option level="0" value="0" >顶级</option>
						<list from="$node" name="$v">	
							<option level="{$v.level}" value="{$v.nid}">{$v.name}</option>
						</list>
					</select>
					<span id="showNodeName" style='padding-left:5px; color:#99f0fa;'> </span>											
					</dd>									
				</dl>
				<dl>
					<dt><strong>当前level：</strong></dt>
					<dd>
						<input value="" type="text" style='width:25px; border:none;' name="level">
						<span id="showNodeLevel" style='padding-left:5px; color:#99f0fa;'> </span>
					</dd>
				</dl>
			</div>	
			<input type="submit" class="submit" value="提交">		
		</form>
	</div>
</body>
</html>